package com.sure.classsystemserver.security.login.Impl;

import com.sure.classsystemserver.security.login.dao.LoginDao;
import com.sure.classsystemserver.security.login.LoginDto;
import com.sure.classsystemserver.security.login.LoginService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class LoginServiceImpl implements LoginService {

    @Resource
    private LoginDao loginDao;

    @Override
    public boolean checkLogin(LoginDto loginDto) {
        int count= loginDao.findCountByIdAndPwd(loginDto);
        return count>0;
    }
}
